package com.summer.bean;

import java.util.Date;
import java.util.Objects;

/**
 * Created by IntelliJ IDEA.
 * Description:
 * User: 35391
 * Package: com.summer.pojo
 * Date: 2025/3/25
 * Time: 下午3:01
 * Version: 1.0
 */
public class Student {
    private String Sno;
    private String Sname;
    private String Sdept;
    private String Address;
    private String gender;
    private Date DOB;
    private String Telephone;
    private String degree;

    public Student() {
    }
    public Student(String sno, String sname, String sdept, String address, String gender, Date DOB, String telephone, String degree) {
        Sno = sno;
        Sname = sname;
        Sdept = sdept;
        Address = address;
        this.gender = gender;
        this.DOB = DOB;
        Telephone = telephone;
        this.degree = degree;
    }

    @Override
    public String toString() {
        return "Student{" +
                "Sno='" + Sno + '\'' +
                ", Sname='" + Sname + '\'' +
                ", Sdept='" + Sdept + '\'' +
                ", Address='" + Address + '\'' +
                ", gender='" + gender + '\'' +
                ", DOB=" + DOB +
                ", Telephone='" + Telephone + '\'' +
                ", degree='" + degree + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(Sno, student.Sno) && Objects.equals(Sname, student.Sname) && Objects.equals(Sdept, student.Sdept) && Objects.equals(Address, student.Address) && Objects.equals(gender, student.gender) && Objects.equals(DOB, student.DOB) && Objects.equals(Telephone, student.Telephone) && Objects.equals(degree, student.degree);
    }

    @Override
    public int hashCode() {
        return Objects.hash(Sno, Sname, Sdept, Address, gender, DOB, Telephone, degree);
    }

    public String getSno() {
        return Sno;
    }

    public void setSno(String sno) {
        Sno = sno;
    }

    public String getSname() {
        return Sname;
    }

    public void setSname(String sname) {
        Sname = sname;
    }

    public String getSdept() {
        return Sdept;
    }

    public void setSdept(String sdept) {
        Sdept = sdept;
    }

    public String getAddress() {
        return Address;
    }

    public void setAddress(String address) {
        Address = address;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Date getDOB() {
        return DOB;
    }

    public void setDOB(Date DOB) {
        this.DOB = DOB;
    }

    public String getTelephone() {
        return Telephone;
    }

    public void setTelephone(String telephone) {
        Telephone = telephone;
    }

    public String getDegree() {
        return degree;
    }

    public void setDegree(String degree) {
        this.degree = degree;
    }
}
